using UnityEditor;
using UnityEngine;

namespace Ease.EaseNode.Editor.NodeView
{
    public static class EaseWindow<T> where T : BaseEaseEditorWindow
    {
        public static T Instance { get; set; }

        public static void OpenWindow(string title)
        {
            T wnd = EditorWindow.GetWindow<T>();
            title = string.IsNullOrEmpty(title) ? typeof(T).Name : title;
            wnd.titleContent = new GUIContent(title);
            Instance = wnd;
        }
    }
}